load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")

oncall("scm_client_infra")

cpp_library(
    name = "prjfs",
    srcs = [
        "Enumerator.cpp",
        "PrjfsChannel.cpp",
        "PrjfsDispatcher.cpp",
    ],
    headers = [
        "Enumerator.h",
        "PrjfsChannel.h",
        "PrjfsDispatcher.h",
        "PrjfsRequestContext.h",
    ],
    os_deps = [
        (
            "windows",
            ["fbsource//third-party/toolchains/win:ProjectedFSLib.lib"],
        ),
    ],
    deps = [
        "fbsource//third-party/fmt:fmt",
        "//eden/common/telemetry:structured_logger",
        "//eden/common/utils:bug",
        "//eden/common/utils:fault_injector",
        "//eden/common/utils:stringconv",
        "//eden/common/utils/windows:win_error",
        "//eden/fs/config:config",
        "//eden/fs/notifications:notifier",
        "//eden/fs/telemetry:log_info",
        "//eden/fs/telemetry:stats",
        "//eden/fs/utils:eden_error",
        "//eden/fs/utils:static_assert",
        "//folly/executors:global_executor",
        "//folly/executors:serial_executor",
        "//folly/logging:logging",
    ],
    exported_deps = [
        "//eden/common/telemetry:telemetry",
        "//eden/common/utils:immediate_future",
        "//eden/common/utils:path",
        "//eden/common/utils:ref_ptr",
        "//eden/common/utils:utils",
        "//eden/fs/inodes:fs_channel",
        "//eden/fs/inodes:inode_metadata",
        "//eden/fs/inodes:request_context",
        "//eden/fs/model:model",
        "//eden/fs/service:thrift-cpp2-types",
        "//eden/fs/utils:process_access_log",
        "//folly/concurrency/memory:atomic_read_mostly_main_ptr",
        "//folly/executors:sequenced_executor",
        "//folly/futures:future_splitter",
        "//folly/portability:windows",
        "//thrift/lib/cpp/util:enum_utils",
    ],
)

cpp_library(
    name = "disk_state",
    srcs = [
        "PrjfsDiskState.cpp",
    ],
    headers = [
        "PrjfsDiskState.h",
    ],
    deps = [
        "//eden/common/utils:case_sensitivity",
        "//eden/common/utils:file_utils",
        "//eden/common/utils/windows:win_error",
        "//eden/fs/config:config",
        "//eden/fs/inodes:inode_number",
        "//eden/fs/utils:projfs_util",
        "//folly/executors:serial_executor",
    ],
    exported_deps = [
        "//eden/common/utils:path",
        "//eden/common/utils:utils",
        "//eden/fs/inodes/overlay:serialization-cpp2-types",
        "//eden/fs/model:model",
        "//folly/portability:windows",
    ],
)
